<template>
	<view class="settings">
		<view class="goBack" @click="goBack">返回</view>
		<view class="cont">
			<view class="pictureBox">
				<view class="title">视频画质</view>
				<view class="pictureBtnBox">
					<view class="pictureBtn" @click="pictureBtnClick(0)"
						:class="pictureActive == 0 ? 'pictureActive' : ''">流畅</view>
					<view class="pictureBtn" @click="pictureBtnClick(1)"
						:class="pictureActive == 1 ? 'pictureActive' : ''">高清</view>
					<view class="pictureBtn" @click="pictureBtnClick(2)"
						:class="pictureActive == 2 ? 'pictureActive' : ''">超清</view>
				</view>
			</view>
			<view class="pictureBox">
				<view class="title">音效音量</view>
				<slider value="50" @change="sliderChange" />
			</view>
			<view class="pictureBox">
				<view class="title">主音量</view>
				<slider value="50" @change="sliderChange" />
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			pictureActive: 1
		}
	},
	methods: {
		sliderChange(e) {
			console.log('value 发生变化：' + e.detail.value)
		},
		pictureBtnClick(num) {
			console.log('点击了画质按钮')
			this.pictureActive = num
		},
		goBack() {
			uni.navigateBack()
		}
	}
}
</script>

<style scoped lang="less">
.settings {
	width: 100%;
	height: 100vh;
	//背景从上至下，由浅蓝变白
	background: linear-gradient(to bottom, #aaffff, #ffffff);
	overflow: hidden;

	.goBack {
		position: absolute;
		top: 10rpx;
		right: 10rpx;
		width: 100rpx;
		height: 24rpx;
		//粉色背景
		background: #F8879C;
		border-radius: 12rpx;
		text-align: center;
		line-height: 24rpx;
		color: #fff;
		font-size: 14rpx;
	}

	.cont {
		width: 80%;
		height: 80vh;
		border: 2rpx solid #a7a4a4;
		border-radius: 20rpx;
		margin: 10vh auto;
		box-sizing: border-box;
		padding: 20rpx 15% 0;

		.pictureBox {
			width: 100%;
			display: flex;
			align-items: center;
			margin-top: 40rpx;

			.title {
				font-size: 16rpx;
				width: 20%;
				text-align: right;
				margin-right: 20rpx;
				color: #fff;
				text-shadow: 0 0 10rpx #000;
				// -webkit-text-stroke: 1rpx #000;
				
			}

			uni-slider {
				flex: 1;
				margin: 0;
			}

			.pictureBtnBox {
				flex: 1;
				display: flex;
				justify-content: space-around;
				background: #b6b5b5;
				border-radius: 10rpx;
				border: 2rpx solid #fff;

				.pictureBtn {
					width: 33.33%;
					height: 20rpx;
					line-height: 20rpx;
					text-align: center;
					font-size: 12rpx;
					color: #fff;
				}

				.pictureActive {
					background: rgb(98, 177, 237);
					border-radius: 10rpx;
				}
			}
		}
	}
}
</style>